import streamlit as st
import utills
import os
import pandas as pd
import pygwalker as pyg
import subprocess

from pygwalker.api.streamlit import StreamlitRenderer
import extra_streamlit_components as stx
from annotated_text import annotated_text
from streamlit_image_coordinates import streamlit_image_coordinates
from testforpdf import generate
# Set page configuration to hide the sidebar on load
st.set_page_config(layout="wide")
upload_folder = "./upload/video_input/"
landmarks_folder = "./landmarks"
visualize_folder = "./visualize"
upload_folder = "./upload/images"

if "WelcomeState" not in st.session_state:
    st.session_state.WelcomeState = "Unupload"

def clear_folder(folder_path):
    # 获取文件夹中的所有文件和子文件夹
    files = os.listdir(folder_path)
    if not files:  # 如果文件夹为空
        return "文件夹内无文件"
    for file in files:
        # 构建文件/文件夹的完整路径
        file_path = os.path.join(folder_path, file)
        # 如果是文件，则删除
        if os.path.isfile(file_path):
            os.remove(file_path)
        # 如果是文件夹，则递归清空
        elif os.path.isdir(file_path):
            clear_folder(file_path)




headCol = st.columns([1,1,1])
with headCol[1]:
     image_url = ""
     stx.bouncing_image(image_source=image_url, animate=False, animation_time=1500, height=200, width=250)
with headCol[0]:
     image_url = ""
     stx.bouncing_image(image_source=image_url, animate=False, animation_time=1500, height=200, width=250)
with headCol[2]:
     image_url = ""
     stx.bouncing_image(image_source=image_url, animate=False, animation_time=1500, height=200, width=250)

header_html = "<h1 style='padding-left:370px'>灵眸识幻系统</h1>"
st.markdown(header_html,unsafe_allow_html=True)



